<script setup lang="ts">
import { useFollowTheme } from "@/theme";

const props = defineProps<{
  text?: string;
  placeholder?: string;
  isView?: boolean;
}>();

const emits = defineEmits<{
  (e: "click"): void;
}>();

const { followThemeConfig } = useFollowTheme();
</script>

<template>
  <view
    @click="emits('click')"
    class="tw-flex tw-items-center tw-justify-between tw-px-[20rpx]"
  >
    <tm-text
      :userInteractionEnabled="false"
      :font-size="30"
      :color="props.text ? followThemeConfig.color : '#808080'"
      :label="props.text || props.placeholder || '请选择'"
    ></tm-text>
    <tm-icon v-if="!isView"
      :userInteractionEnabled="false"
      :font-size="24"
      name="tmicon-angle-right"
    ></tm-icon>
  </view>
</template>

<style scoped></style>
